package com.example.yian.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;

public class ChatResponse {
    @JsonProperty("chat_id")
    private String chatId;

    public String getChatId() {
        return chatId;
    }

    @JsonProperty("id")
    private String id;

    public String getId() {
        return id;
    }

    @JsonProperty("operate")
    private boolean operate;

    public boolean getOperate() {
        return operate;
    }

    @JsonProperty("content")
    private String content;

    public String getContent() {
        return content;
    }

    @JsonProperty("is_end")
    private boolean isEnd;

    public Boolean getIsEnd() {
        return isEnd;
    }

    // Getters and Setters

    public String toJson() throws JsonProcessingException {
        return new ObjectMapper().writeValueAsString(this);
    }
}
